# $Id: PKGBUILD 178305 2013-02-19 21:05:36Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=libmng
pkgver=1.0.10
pkgrel=4
pkgdesc="A collection of routines used to create and manipulate MNG format graphics files"
arch=('i686' 'x86_64')
url="http://www.libmng.com/"
license=('custom')
depends=('zlib' 'libjpeg')
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
md5sums=('eaf1476a3bb29f6190bca660e6abef16')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's/AM_C_PROTOTYPES//' makefiles/configure.in
  ln -s makefiles/configure.in .
  ln -s makefiles/Makefile.am .
  autoreconf --force --install
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
